package com.slaffka.report;

import java.util.Arrays;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: slaffka
 * Date: 18.11.12
 * Time: 23:28
 * To change this template use File | Settings | File Templates.
 */
public enum DocumentType {
    PDF("pdf"), XLSX("xlsx"), DOCX("docx"), HTML("html");

    private String name;

    DocumentType(String name){
        this.name = name;
    }

    public static DocumentType getDocumentTypeByName(String name){
        DocumentType documentType = null;
        for (DocumentType docType: DocumentType.values()){
            if (docType.name.equals(name)){
                documentType = docType;
                break;
            }
        }
        return documentType;
    }
}
